import { BaseEntity } from '@cool-midway/core';
import { Column, Entity, Index } from 'typeorm';

/**
 * game模块-关卡信息
 */
@Entity('game_level_info')
export class GameLevelInfoEntity extends BaseEntity {
  @Index()
  @Column({ comment: '名称', length: 100 })
  name: string;

  @Index({ unique: true })
  @Column({ comment: '关卡编号', default: 1 })
  orderNum: number;

  @Column({ comment: '描述', type: 'text', nullable: true })
  description: string;

  @Column({ comment: '难度 0-简单 1-中等 2-困难', default: 0, type: 'tinyint' })
  difficulty: number;

  @Column({ comment: '类型 0-正常关卡 1-试玩关卡', default: 0, type: 'tinyint' })
  type: number;

  @Column({ comment: '下一个关卡id', nullable: true })
  nextLevel: number;

  @Column({ comment: '状态 0-禁用 1-启用', default: 1, type: 'tinyint' })
  status: number;

  @Column({ comment: '关卡地图',type: 'json' })
  levels: any[][];
}
